﻿@using PagedList.Mvc
@model MyWorkBlogMVC.Models.EditUserPostWithCommentModel
@Styles.Render("~/Content/css")
<link href="~/Content/UserPages.css" rel="stylesheet" />

<div>
    @foreach (var comment in @Model.PostComments)
{
    <div class="content">
        <div>@comment.CommentContent</div>
        <br />

        <div>Date of comment: @comment.CommentDate.ToString("D")</div>
        <div>Commented by: @comment.NameOfCommetor</div>
        <hr />
        @using (Html.BeginForm("_EditUserPostComment", "User", new { id = comment.CommentId }))
        {
            <input type="submit" value="Delete comment" onclick="return confirm('Are you sure you want to delete this comment?');" />
        }
    </div>

}

</div>
